<template>
  <el-form ref="addForm" :model="addForm" label-width="100px">
    <el-form-item label="加注机编号">
      <select-filling-machine-single-button
        :init-value="addForm.machineName"
        style="width: 300px; margin-right: 10px; display: inline-block"
        size="small"
        @change="machineChange"
        :onlyNotTeamSeal="true"
      /><el-button type="text">选择加注机</el-button>
    </el-form-item>
    <el-form-item label="优惠单价">
      <el-input
        type="input"
        v-model="addForm.noName"
        size="small"
        style="width: 300px; margin-right: 10px"
      ></el-input
      >元/kg·L
    </el-form-item>
    <div class="dividing-line m-t-20 m-b-20"></div>
    <div class="flex-end">
      <el-button type="primary" size="small" plain @click="back"
        >取消</el-button
      >
      <el-button type="primary" size="small">确定</el-button>
    </div>
  </el-form>
</template>
<script>
import SelectFillingMachineSingleButton from "@/components/business/select-filling-machine-single-button.vue";

export default {
  components: { SelectFillingMachineSingleButton },
  data() {
    return {
      addForm: {
        machineName: "",
      },
    };
  },
  methods: {
    machineChange(v) {
      this.addForm.machineId = v.id;
    },
    back() {
      this.$emit("closeAddDialog");
    },
  },
};
</script>
